package com.pshcp.common.enums;

/**
 * @Description: 报告类型 00检查 99检验
 * @Author: chico pei
 * @Date: 2023/02/16 12:36
 */
public enum ReportTypeEnum {

    CHECK("00", "检查"),

    VALID("99", "检验"),

    ;

    private String code;
    private String desc;

    ReportTypeEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static String getDescByCode(String code){
        for(ReportTypeEnum e : ReportTypeEnum.values()){
            if(e.getCode().equals(code)){
                return e.getDesc();
            }
        }
        return null;
    }

}
